<?php

/**
 * Reservacion form base class.
 *
 * @method Reservacion getObject() Returns the current form's model object
 *
 * @package    blackDrums
 * @subpackage form
 * @author     your name here
 */
abstract class BaseReservacionForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'idReservacion'    => new sfWidgetFormInputHidden(),
      'fecha'            => new sfWidgetFormDate(),
      'horaInicio'       => new sfWidgetFormTime(),
      'horaFin'          => new sfWidgetFormTime(),
      'status'           => new sfWidgetFormInputText(),
      'idSala'           => new sfWidgetFormPropelChoice(array('model' => 'Sala', 'add_empty' => false)),
      'idClienteNatural' => new sfWidgetFormPropelChoice(array('model' => 'ClienteNatural', 'add_empty' => false)),
      'idBanda'          => new sfWidgetFormPropelChoice(array('model' => 'Banda', 'add_empty' => true)),
    ));

    $this->setValidators(array(
      'idReservacion'    => new sfValidatorPropelChoice(array('model' => 'Reservacion', 'column' => 'idReservacion', 'required' => false)),
      'fecha'            => new sfValidatorDate(),
      'horaInicio'       => new sfValidatorTime(),
      'horaFin'          => new sfValidatorTime(),
      'status'           => new sfValidatorString(array('max_length' => 15)),
      'idSala'           => new sfValidatorPropelChoice(array('model' => 'Sala', 'column' => 'idSala')),
      'idClienteNatural' => new sfValidatorPropelChoice(array('model' => 'ClienteNatural', 'column' => 'cedula')),
      'idBanda'          => new sfValidatorPropelChoice(array('model' => 'Banda', 'column' => 'idBanda', 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('reservacion[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Reservacion';
  }


}
